<?php
include_once '../__global.php';

class aj_getUserCard extends ml_controller
{
    private $uid;
    private $_aid;
    
    function initParam() {
        
        $this->uid = $this->input('uid','G',0);
        $this->_aid = $this->__visitor['uid'];
    }
    
    function checkParam() {
        $this->check_referer();
        if (!ml_tool_isuid::is_mluid($this->uid)) {
            $this->api_output(ML_RCODE_PARAM);
        }
        
    }
    
    
    function main() {
        
        $obUser = ml_biz_user_getinfo::get_instance();
        $obUser->initUser($this->uid, $this->_aid);
        $result = $obUser->getUserCard();
        
        
        $data = array();
        $data['nick'] = $result['nickname'];
        $data['uid'] = $this->uid;
        $data['headPic'] = $result['HeaderUrl'];     //头像地址
        $data['fanNum'] = $result['FollowCount'];     //粉丝数
        $data['followNum'] = $result['AttenttionCount'];   //我关注数
        $data['myPostNum'] = $result['FeedCount'];    //
        $data['voteNum'] = $result['VoteCount'];    //
        $data['adeptTag'] = $result['skill_tags'];
        $data['isFollow'] = $result['isFollow']';
        
        
        $this->api_output(ML_RCODE_SUCC, $data);
    }
}

new aj_getUserCard();